<!DOCTYPE html>
<html>


<!-- Mirrored from www.zi-han.net/theme/hplus/table_data_tables.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:20:01 GMT -->

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>门店信息</title>

    <link rel="shortcut icon" href="favicon.ico">
    <link href="__PUBLIC__/dist/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/dist/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">

    <!-- Data Tables -->
    <link href="__PUBLIC__/dist/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">

    <link href="__PUBLIC__/dist/css/animate.min.css" rel="stylesheet">
    <link href="__PUBLIC__/dist/css/style.min862f.css?v=4.1.0" rel="stylesheet">
</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>{$info ? '编辑' : '新增'}门店信息
                        </h5>
                    </div>
                    <div class="ibox-content">
                        <form id="myform" role="form" class="form-horizontal m-t" method="post">
                            <div class="form-group draggable ui-draggable">
                                <label class="col-sm-2 control-label">名称：</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" id="name" name="name" value="{$info.name}"
                                        placeholder="请输入名称" required>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group draggable ui-draggable">
                                <label class="col-sm-2 control-label">所属分类：</label>
                                <div class="col-sm-10">
                                    <select name="type_id" class="form-control" required>
                                        <option value="0">选择分类</option>
                                        {foreach name="types" item="item"}
                                        <option value="{$item.id}" {if condition="$item['id'] eq $info['type_id']"}selected{/if} >{$item.name}</option>
                                        {/foreach}
                                    </select>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group draggable ui-draggable">
                                <label class="col-sm-2 control-label">编号：</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" id="store_no" name="store_no" value="{$info.store_no}"
                                        placeholder="请输入编号" required>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group draggable ui-draggable">
                                <label class="col-sm-2 control-label">联系人：</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" id="contactor" name="contactor" value="{$info.contactor}"
                                        placeholder="请输入联系人" required>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group draggable ui-draggable">
                                <label class="col-sm-2 control-label">联系电话：</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" id="tel" name="tel" value="{$info.tel}"
                                        placeholder="请输入联系电话" required>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group draggable ui-draggable">
                                <label class="col-sm-2 control-label">联系地址：</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" id="address" name="address" value="{$info.address}"
                                        placeholder="请输入联系地址" required>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">封面图</label>
                                <div class="col-sm-3" id="file-pretty">
                                    <div class="input-append input-group">
                                        <span class="input-group-btn">
                                            <button class="btn btn-white" type="button" onclick="GetUploadify(1,'','store','call_back');">选择文件</button>
                                        </span>
                                        <input class="input-large form-control" id="original_img_input" type="text" name="img_url" value="{$info.img_url}">
                                    </div>
                                </div>
                                <div class="col-sm-1" id="original_img" style="position: relative;">
                                    {if condition="$info['img_url']"}
                                        <img src="{$info.img_url}" alt="" class="goods-image" style="height:34px">
                                        <div style="position:absolute;bottom:0;left:65px;display:none;border: 1px solid #ccc;"><img src="{$info.img_url}" alt="" style="max-width: 500px;z-index: 999"></div>
                                    {/if}
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group draggable ui-draggable">
                                <div class="col-sm-12 col-sm-offset-3">
                                    <input type="hidden" name="creator_id" value="{$info.creator_id}">
                                    <input type="hidden" name="create_time" value="{$info.create_time}">
                                    <input type="hidden" name="id" value="{$info.id}">
                                    <button class="btn btn-primary" type="submit">保存内容</button>
                                    <button class="btn btn-white" type="button" onclick="javascript:history.go(-1);">取消</button>
                                </div>
                            </div>
                        </form>
                        <div class="clearfix"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="__PUBLIC__/dist/js/jquery.min.js?v=2.1.4"></script>
    <script src="__PUBLIC__/dist/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="http://static.runoob.com/assets/jquery-validation-1.14.0/lib/jquery.js"></script>
    <script src="http://static.runoob.com/assets/jquery-validation-1.14.0/dist/jquery.validate.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="__PUBLIC__/libs/global.js?rnd=12345678"> </script>

    <script>

        /*
         * 以下是图片上传方法
         */
        // 上传服务图片成功回调函数
        function call_back(fileurl_tmp){
            $("#original_img").html('<img src="'+fileurl_tmp+'" alt="" style="height:34px">');
            $('#original_img_input').val(fileurl_tmp);
        }
        $().ready(function () {
            // 在键盘按下并释放及提交后验证提交表单
            $("#myform").validate({
                rules: {
                    name: {
                        required: true,
                        rangelength: [2, 32]
                    },
                    store_no: {
                        required: true
                    }
                },
                messages: {
                    name: {
                        required: "请输入名称",
                        rangelength: "名称长度不能小于 2 个字符"
                    },
                    store_no: {
                        required: "请输入编号"
                    }
                }
            })
        });
    </script>
</body>


<!-- Mirrored from www.zi-han.net/theme/hplus/table_data_tables.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:20:02 GMT -->

</html>